/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * IAM API
 * IAM相关接口
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Iam.Apis;
using JDCloudSDK.Iam.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Iam.Client
{
    /// <summary>
    ///  IAM API
    ///  IAM相关接口
    ///  Iam Api 客户端
    ///</summary>
    public class IamClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private IamClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public IamClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public IamClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public IamClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.0
        ///</summary>
        public const string ClientVersion = "1.2.0";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "iam.jdcloud-api.com";
        private const string serviceName = "iam";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  删除子用户信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteSubUserResponse DeleteSubUser(DeleteSubUserRequest request) {
            return  new DeleteSubUserExecutor().Client(this).Execute<DeleteSubUserResponse, DeleteSubUserResult, DeleteSubUserRequest>(request);
        }
#else
        /// <summary>
        ///  删除子用户信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteSubUserResponse> DeleteSubUser(DeleteSubUserRequest request) {
            return await new DeleteSubUserExecutor().Client(this).Execute<DeleteSubUserResponse, DeleteSubUserResult, DeleteSubUserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询用户组列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeGroupsResponse DescribeGroups(DescribeGroupsRequest request) {
            return  new DescribeGroupsExecutor().Client(this).Execute<DescribeGroupsResponse, DescribeGroupsResult, DescribeGroupsRequest>(request);
        }
#else
        /// <summary>
        ///  查询用户组列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeGroupsResponse> DescribeGroups(DescribeGroupsRequest request) {
            return await new DescribeGroupsExecutor().Client(this).Execute<DescribeGroupsResponse, DescribeGroupsResult, DescribeGroupsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  列举用户组的策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAttachedGroupPoliciesResponse DescribeAttachedGroupPolicies(DescribeAttachedGroupPoliciesRequest request) {
            return  new DescribeAttachedGroupPoliciesExecutor().Client(this).Execute<DescribeAttachedGroupPoliciesResponse, DescribeAttachedGroupPoliciesResult, DescribeAttachedGroupPoliciesRequest>(request);
        }
#else
        /// <summary>
        ///  列举用户组的策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAttachedGroupPoliciesResponse> DescribeAttachedGroupPolicies(DescribeAttachedGroupPoliciesRequest request) {
            return await new DescribeAttachedGroupPoliciesExecutor().Client(this).Execute<DescribeAttachedGroupPoliciesResponse, DescribeAttachedGroupPoliciesResult, DescribeAttachedGroupPoliciesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建子用户
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateSubUserResponse CreateSubUser(CreateSubUserRequest request) {
            return  new CreateSubUserExecutor().Client(this).Execute<CreateSubUserResponse, CreateSubUserResult, CreateSubUserRequest>(request);
        }
#else
        /// <summary>
        ///  创建子用户
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateSubUserResponse> CreateSubUser(CreateSubUserRequest request) {
            return await new CreateSubUserExecutor().Client(this).Execute<CreateSubUserResponse, CreateSubUserResult, CreateSubUserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeletePolicyResponse DeletePolicy(DeletePolicyRequest request) {
            return  new DeletePolicyExecutor().Client(this).Execute<DeletePolicyResponse, DeletePolicyResult, DeletePolicyRequest>(request);
        }
#else
        /// <summary>
        ///  删除策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeletePolicyResponse> DeletePolicy(DeletePolicyRequest request) {
            return await new DeletePolicyExecutor().Client(this).Execute<DeletePolicyResponse, DeletePolicyResult, DeletePolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为角色绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DetachRolePolicyResponse DetachRolePolicy(DetachRolePolicyRequest request) {
            return  new DetachRolePolicyExecutor().Client(this).Execute<DetachRolePolicyResponse, DetachRolePolicyResult, DetachRolePolicyRequest>(request);
        }
#else
        /// <summary>
        ///  为角色绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DetachRolePolicyResponse> DetachRolePolicy(DetachRolePolicyRequest request) {
            return await new DetachRolePolicyExecutor().Client(this).Execute<DetachRolePolicyResponse, DetachRolePolicyResult, DetachRolePolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询子用户所属的所有组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubUserGroupsResponse DescribeSubUserGroups(DescribeSubUserGroupsRequest request) {
            return  new DescribeSubUserGroupsExecutor().Client(this).Execute<DescribeSubUserGroupsResponse, DescribeSubUserGroupsResult, DescribeSubUserGroupsRequest>(request);
        }
#else
        /// <summary>
        ///  查询子用户所属的所有组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubUserGroupsResponse> DescribeSubUserGroups(DescribeSubUserGroupsRequest request) {
            return await new DescribeSubUserGroupsExecutor().Client(this).Execute<DescribeSubUserGroupsResponse, DescribeSubUserGroupsResult, DescribeSubUserGroupsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询用户组详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeGroupResponse DescribeGroup(DescribeGroupRequest request) {
            return  new DescribeGroupExecutor().Client(this).Execute<DescribeGroupResponse, DescribeGroupResult, DescribeGroupRequest>(request);
        }
#else
        /// <summary>
        ///  查询用户组详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeGroupResponse> DescribeGroup(DescribeGroupRequest request) {
            return await new DescribeGroupExecutor().Client(this).Execute<DescribeGroupResponse, DescribeGroupResult, DescribeGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询子用户信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubUserResponse DescribeSubUser(DescribeSubUserRequest request) {
            return  new DescribeSubUserExecutor().Client(this).Execute<DescribeSubUserResponse, DescribeSubUserResult, DescribeSubUserRequest>(request);
        }
#else
        /// <summary>
        ///  查询子用户信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubUserResponse> DescribeSubUser(DescribeSubUserRequest request) {
            return await new DescribeSubUserExecutor().Client(this).Execute<DescribeSubUserResponse, DescribeSubUserResult, DescribeSubUserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改策略描述
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdatePolicyDescriptionResponse UpdatePolicyDescription(UpdatePolicyDescriptionRequest request) {
            return  new UpdatePolicyDescriptionExecutor().Client(this).Execute<UpdatePolicyDescriptionResponse, UpdatePolicyDescriptionResult, UpdatePolicyDescriptionRequest>(request);
        }
#else
        /// <summary>
        ///  修改策略描述
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdatePolicyDescriptionResponse> UpdatePolicyDescription(UpdatePolicyDescriptionRequest request) {
            return await new UpdatePolicyDescriptionExecutor().Client(this).Execute<UpdatePolicyDescriptionResponse, UpdatePolicyDescriptionResult, UpdatePolicyDescriptionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  启用主账号AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public EnabledUserAccessKeyResponse EnabledUserAccessKey(EnabledUserAccessKeyRequest request) {
            return  new EnabledUserAccessKeyExecutor().Client(this).Execute<EnabledUserAccessKeyResponse, EnabledUserAccessKeyResult, EnabledUserAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  启用主账号AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<EnabledUserAccessKeyResponse> EnabledUserAccessKey(EnabledUserAccessKeyRequest request) {
            return await new EnabledUserAccessKeyExecutor().Client(this).Execute<EnabledUserAccessKeyResponse, EnabledUserAccessKeyResult, EnabledUserAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改用户组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateGroupResponse UpdateGroup(UpdateGroupRequest request) {
            return  new UpdateGroupExecutor().Client(this).Execute<UpdateGroupResponse, UpdateGroupResult, UpdateGroupRequest>(request);
        }
#else
        /// <summary>
        ///  修改用户组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateGroupResponse> UpdateGroup(UpdateGroupRequest request) {
            return await new UpdateGroupExecutor().Client(this).Execute<UpdateGroupResponse, UpdateGroupResult, UpdateGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为子用户解绑策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public RemovePermissionOfSubUserResponse RemovePermissionOfSubUser(RemovePermissionOfSubUserRequest request) {
            return  new RemovePermissionOfSubUserExecutor().Client(this).Execute<RemovePermissionOfSubUserResponse, RemovePermissionOfSubUserResult, RemovePermissionOfSubUserRequest>(request);
        }
#else
        /// <summary>
        ///  为子用户解绑策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<RemovePermissionOfSubUserResponse> RemovePermissionOfSubUser(RemovePermissionOfSubUserRequest request) {
            return await new RemovePermissionOfSubUserExecutor().Client(this).Execute<RemovePermissionOfSubUserResponse, RemovePermissionOfSubUserResult, RemovePermissionOfSubUserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询子用户绑定的策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAttachedSubUserPoliciesResponse DescribeAttachedSubUserPolicies(DescribeAttachedSubUserPoliciesRequest request) {
            return  new DescribeAttachedSubUserPoliciesExecutor().Client(this).Execute<DescribeAttachedSubUserPoliciesResponse, DescribeAttachedSubUserPoliciesResult, DescribeAttachedSubUserPoliciesRequest>(request);
        }
#else
        /// <summary>
        ///  查询子用户绑定的策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAttachedSubUserPoliciesResponse> DescribeAttachedSubUserPolicies(DescribeAttachedSubUserPoliciesRequest request) {
            return await new DescribeAttachedSubUserPoliciesExecutor().Client(this).Execute<DescribeAttachedSubUserPoliciesResponse, DescribeAttachedSubUserPoliciesResult, DescribeAttachedSubUserPoliciesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改策略文档
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdatePolicyResponse UpdatePolicy(UpdatePolicyRequest request) {
            return  new UpdatePolicyExecutor().Client(this).Execute<UpdatePolicyResponse, UpdatePolicyResult, UpdatePolicyRequest>(request);
        }
#else
        /// <summary>
        ///  修改策略文档
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdatePolicyResponse> UpdatePolicy(UpdatePolicyRequest request) {
            return await new UpdatePolicyExecutor().Client(this).Execute<UpdatePolicyResponse, UpdatePolicyResult, UpdatePolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  添加子用户到用户组中
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddSubUserToGroupResponse AddSubUserToGroup(AddSubUserToGroupRequest request) {
            return  new AddSubUserToGroupExecutor().Client(this).Execute<AddSubUserToGroupResponse, AddSubUserToGroupResult, AddSubUserToGroupRequest>(request);
        }
#else
        /// <summary>
        ///  添加子用户到用户组中
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddSubUserToGroupResponse> AddSubUserToGroup(AddSubUserToGroupRequest request) {
            return await new AddSubUserToGroupExecutor().Client(this).Execute<AddSubUserToGroupResponse, AddSubUserToGroupResult, AddSubUserToGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建用户组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateGroupResponse CreateGroup(CreateGroupRequest request) {
            return  new CreateGroupExecutor().Client(this).Execute<CreateGroupResponse, CreateGroupResult, CreateGroupRequest>(request);
        }
#else
        /// <summary>
        ///  创建用户组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateGroupResponse> CreateGroup(CreateGroupRequest request) {
            return await new CreateGroupExecutor().Client(this).Execute<CreateGroupResponse, CreateGroupResult, CreateGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除子用户的AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteSubUserAccessKeyResponse DeleteSubUserAccessKey(DeleteSubUserAccessKeyRequest request) {
            return  new DeleteSubUserAccessKeyExecutor().Client(this).Execute<DeleteSubUserAccessKeyResponse, DeleteSubUserAccessKeyResult, DeleteSubUserAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  删除子用户的AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteSubUserAccessKeyResponse> DeleteSubUserAccessKey(DeleteSubUserAccessKeyRequest request) {
            return await new DeleteSubUserAccessKeyExecutor().Client(this).Execute<DeleteSubUserAccessKeyResponse, DeleteSubUserAccessKeyResult, DeleteSubUserAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为角色绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AttachRolePolicyResponse AttachRolePolicy(AttachRolePolicyRequest request) {
            return  new AttachRolePolicyExecutor().Client(this).Execute<AttachRolePolicyResponse, AttachRolePolicyResult, AttachRolePolicyRequest>(request);
        }
#else
        /// <summary>
        ///  为角色绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AttachRolePolicyResponse> AttachRolePolicy(AttachRolePolicyRequest request) {
            return await new AttachRolePolicyExecutor().Client(this).Execute<AttachRolePolicyResponse, AttachRolePolicyResult, AttachRolePolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  禁用主账号AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DisabledUserAccessKeyResponse DisabledUserAccessKey(DisabledUserAccessKeyRequest request) {
            return  new DisabledUserAccessKeyExecutor().Client(this).Execute<DisabledUserAccessKeyResponse, DisabledUserAccessKeyResult, DisabledUserAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  禁用主账号AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DisabledUserAccessKeyResponse> DisabledUserAccessKey(DisabledUserAccessKeyRequest request) {
            return await new DisabledUserAccessKeyExecutor().Client(this).Execute<DisabledUserAccessKeyResponse, DisabledUserAccessKeyResult, DisabledUserAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建角色
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateRoleResponse CreateRole(CreateRoleRequest request) {
            return  new CreateRoleExecutor().Client(this).Execute<CreateRoleResponse, CreateRoleResult, CreateRoleRequest>(request);
        }
#else
        /// <summary>
        ///  创建角色
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateRoleResponse> CreateRole(CreateRoleRequest request) {
            return await new CreateRoleExecutor().Client(this).Execute<CreateRoleResponse, CreateRoleResult, CreateRoleRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询子用户策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubUserPermissionsResponse DescribeSubUserPermissions(DescribeSubUserPermissionsRequest request) {
            return  new DescribeSubUserPermissionsExecutor().Client(this).Execute<DescribeSubUserPermissionsResponse, DescribeSubUserPermissionsResult, DescribeSubUserPermissionsRequest>(request);
        }
#else
        /// <summary>
        ///  查询子用户策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubUserPermissionsResponse> DescribeSubUserPermissions(DescribeSubUserPermissionsRequest request) {
            return await new DescribeSubUserPermissionsExecutor().Client(this).Execute<DescribeSubUserPermissionsResponse, DescribeSubUserPermissionsResult, DescribeSubUserPermissionsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdatePermissionResponse UpdatePermission(UpdatePermissionRequest request) {
            return  new UpdatePermissionExecutor().Client(this).Execute<UpdatePermissionResponse, UpdatePermissionResult, UpdatePermissionRequest>(request);
        }
#else
        /// <summary>
        ///  修改策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdatePermissionResponse> UpdatePermission(UpdatePermissionRequest request) {
            return await new UpdatePermissionExecutor().Client(this).Execute<UpdatePermissionResponse, UpdatePermissionResult, UpdatePermissionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为子用户绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AttachSubUserPolicyResponse AttachSubUserPolicy(AttachSubUserPolicyRequest request) {
            return  new AttachSubUserPolicyExecutor().Client(this).Execute<AttachSubUserPolicyResponse, AttachSubUserPolicyResult, AttachSubUserPolicyRequest>(request);
        }
#else
        /// <summary>
        ///  为子用户绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AttachSubUserPolicyResponse> AttachSubUserPolicy(AttachSubUserPolicyRequest request) {
            return await new AttachSubUserPolicyExecutor().Client(this).Execute<AttachSubUserPolicyResponse, AttachSubUserPolicyResult, AttachSubUserPolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询子用户列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSubUsersResponse DescribeSubUsers(DescribeSubUsersRequest request) {
            return  new DescribeSubUsersExecutor().Client(this).Execute<DescribeSubUsersResponse, DescribeSubUsersResult, DescribeSubUsersRequest>(request);
        }
#else
        /// <summary>
        ///  查询子用户列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSubUsersResponse> DescribeSubUsers(DescribeSubUsersRequest request) {
            return await new DescribeSubUsersExecutor().Client(this).Execute<DescribeSubUsersResponse, DescribeSubUsersResult, DescribeSubUsersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  禁用子用户的AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DisableSubUserAccessKeyResponse DisableSubUserAccessKey(DisableSubUserAccessKeyRequest request) {
            return  new DisableSubUserAccessKeyExecutor().Client(this).Execute<DisableSubUserAccessKeyResponse, DisableSubUserAccessKeyResult, DisableSubUserAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  禁用子用户的AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DisableSubUserAccessKeyResponse> DisableSubUserAccessKey(DisableSubUserAccessKeyRequest request) {
            return await new DisableSubUserAccessKeyExecutor().Client(this).Execute<DisableSubUserAccessKeyResponse, DisableSubUserAccessKeyResult, DisableSubUserAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribePoliciesResponse DescribePolicies(DescribePoliciesRequest request) {
            return  new DescribePoliciesExecutor().Client(this).Execute<DescribePoliciesResponse, DescribePoliciesResult, DescribePoliciesRequest>(request);
        }
#else
        /// <summary>
        ///  查询策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribePoliciesResponse> DescribePolicies(DescribePoliciesRequest request) {
            return await new DescribePoliciesExecutor().Client(this).Execute<DescribePoliciesResponse, DescribePoliciesResult, DescribePoliciesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribePermissionsResponse DescribePermissions(DescribePermissionsRequest request) {
            return  new DescribePermissionsExecutor().Client(this).Execute<DescribePermissionsResponse, DescribePermissionsResult, DescribePermissionsRequest>(request);
        }
#else
        /// <summary>
        ///  查询策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribePermissionsResponse> DescribePermissions(DescribePermissionsRequest request) {
            return await new DescribePermissionsExecutor().Client(this).Execute<DescribePermissionsResponse, DescribePermissionsResult, DescribePermissionsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreatePolicyResponse CreatePolicy(CreatePolicyRequest request) {
            return  new CreatePolicyExecutor().Client(this).Execute<CreatePolicyResponse, CreatePolicyResult, CreatePolicyRequest>(request);
        }
#else
        /// <summary>
        ///  创建策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreatePolicyResponse> CreatePolicy(CreatePolicyRequest request) {
            return await new CreatePolicyExecutor().Client(this).Execute<CreatePolicyResponse, CreatePolicyResult, CreatePolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询角色授权策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeRolePoliciesResponse DescribeRolePolicies(DescribeRolePoliciesRequest request) {
            return  new DescribeRolePoliciesExecutor().Client(this).Execute<DescribeRolePoliciesResponse, DescribeRolePoliciesResult, DescribeRolePoliciesRequest>(request);
        }
#else
        /// <summary>
        ///  查询角色授权策略列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeRolePoliciesResponse> DescribeRolePolicies(DescribeRolePoliciesRequest request) {
            return await new DescribeRolePoliciesExecutor().Client(this).Execute<DescribeRolePoliciesResponse, DescribeRolePoliciesResult, DescribeRolePoliciesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteUserAccessKeyResponse DeleteUserAccessKey(DeleteUserAccessKeyRequest request) {
            return  new DeleteUserAccessKeyExecutor().Client(this).Execute<DeleteUserAccessKeyResponse, DeleteUserAccessKeyResult, DeleteUserAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  删除AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteUserAccessKeyResponse> DeleteUserAccessKey(DeleteUserAccessKeyRequest request) {
            return await new DeleteUserAccessKeyExecutor().Client(this).Execute<DeleteUserAccessKeyResponse, DeleteUserAccessKeyResult, DeleteUserAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为子用户解绑策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DetachSubUserPolicyResponse DetachSubUserPolicy(DetachSubUserPolicyRequest request) {
            return  new DetachSubUserPolicyExecutor().Client(this).Execute<DetachSubUserPolicyResponse, DetachSubUserPolicyResult, DetachSubUserPolicyRequest>(request);
        }
#else
        /// <summary>
        ///  为子用户解绑策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DetachSubUserPolicyResponse> DetachSubUserPolicy(DetachSubUserPolicyRequest request) {
            return await new DetachSubUserPolicyExecutor().Client(this).Execute<DetachSubUserPolicyResponse, DetachSubUserPolicyResult, DetachSubUserPolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询主账号AccessKey列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeUserAccessKeysResponse DescribeUserAccessKeys(DescribeUserAccessKeysRequest request) {
            return  new DescribeUserAccessKeysExecutor().Client(this).Execute<DescribeUserAccessKeysResponse, DescribeUserAccessKeysResult, DescribeUserAccessKeysRequest>(request);
        }
#else
        /// <summary>
        ///  查询主账号AccessKey列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeUserAccessKeysResponse> DescribeUserAccessKeys(DescribeUserAccessKeysRequest request) {
            return await new DescribeUserAccessKeysExecutor().Client(this).Execute<DescribeUserAccessKeysResponse, DescribeUserAccessKeysResult, DescribeUserAccessKeysRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为用户组绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AttachGroupPolicyResponse AttachGroupPolicy(AttachGroupPolicyRequest request) {
            return  new AttachGroupPolicyExecutor().Client(this).Execute<AttachGroupPolicyResponse, AttachGroupPolicyResult, AttachGroupPolicyRequest>(request);
        }
#else
        /// <summary>
        ///  为用户组绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AttachGroupPolicyResponse> AttachGroupPolicy(AttachGroupPolicyRequest request) {
            return await new AttachGroupPolicyExecutor().Client(this).Execute<AttachGroupPolicyResponse, AttachGroupPolicyResult, AttachGroupPolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改子用户信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateSubUserResponse UpdateSubUser(UpdateSubUserRequest request) {
            return  new UpdateSubUserExecutor().Client(this).Execute<UpdateSubUserResponse, UpdateSubUserResult, UpdateSubUserRequest>(request);
        }
#else
        /// <summary>
        ///  修改子用户信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateSubUserResponse> UpdateSubUser(UpdateSubUserRequest request) {
            return await new UpdateSubUserExecutor().Client(this).Execute<UpdateSubUserResponse, UpdateSubUserResult, UpdateSubUserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询用户组内的子用户列表 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeGroupSubUsersResponse DescribeGroupSubUsers(DescribeGroupSubUsersRequest request) {
            return  new DescribeGroupSubUsersExecutor().Client(this).Execute<DescribeGroupSubUsersResponse, DescribeGroupSubUsersResult, DescribeGroupSubUsersRequest>(request);
        }
#else
        /// <summary>
        ///  查询用户组内的子用户列表 
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeGroupSubUsersResponse> DescribeGroupSubUsers(DescribeGroupSubUsersRequest request) {
            return await new DescribeGroupSubUsersExecutor().Client(this).Execute<DescribeGroupSubUsersResponse, DescribeGroupSubUsersResult, DescribeGroupSubUsersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreatePermissionResponse CreatePermission(CreatePermissionRequest request) {
            return  new CreatePermissionExecutor().Client(this).Execute<CreatePermissionResponse, CreatePermissionResult, CreatePermissionRequest>(request);
        }
#else
        /// <summary>
        ///  创建策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreatePermissionResponse> CreatePermission(CreatePermissionRequest request) {
            return await new CreatePermissionExecutor().Client(this).Execute<CreatePermissionResponse, CreatePermissionResult, CreatePermissionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为用户组解绑策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DetachGroupPolicyResponse DetachGroupPolicy(DetachGroupPolicyRequest request) {
            return  new DetachGroupPolicyExecutor().Client(this).Execute<DetachGroupPolicyResponse, DetachGroupPolicyResult, DetachGroupPolicyRequest>(request);
        }
#else
        /// <summary>
        ///  为用户组解绑策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DetachGroupPolicyResponse> DetachGroupPolicy(DetachGroupPolicyRequest request) {
            return await new DetachGroupPolicyExecutor().Client(this).Execute<DetachGroupPolicyResponse, DetachGroupPolicyResult, DetachGroupPolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询角色详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeRoleResponse DescribeRole(DescribeRoleRequest request) {
            return  new DescribeRoleExecutor().Client(this).Execute<DescribeRoleResponse, DescribeRoleResult, DescribeRoleRequest>(request);
        }
#else
        /// <summary>
        ///  查询角色详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeRoleResponse> DescribeRole(DescribeRoleRequest request) {
            return await new DescribeRoleExecutor().Client(this).Execute<DescribeRoleResponse, DescribeRoleResult, DescribeRoleRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改角色内置policy
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateAssumeRolePolicyResponse UpdateAssumeRolePolicy(UpdateAssumeRolePolicyRequest request) {
            return  new UpdateAssumeRolePolicyExecutor().Client(this).Execute<UpdateAssumeRolePolicyResponse, UpdateAssumeRolePolicyResult, UpdateAssumeRolePolicyRequest>(request);
        }
#else
        /// <summary>
        ///  修改角色内置policy
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateAssumeRolePolicyResponse> UpdateAssumeRolePolicy(UpdateAssumeRolePolicyRequest request) {
            return await new UpdateAssumeRolePolicyExecutor().Client(this).Execute<UpdateAssumeRolePolicyResponse, UpdateAssumeRolePolicyResult, UpdateAssumeRolePolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询角色列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeRolesResponse DescribeRoles(DescribeRolesRequest request) {
            return  new DescribeRolesExecutor().Client(this).Execute<DescribeRolesResponse, DescribeRolesResult, DescribeRolesRequest>(request);
        }
#else
        /// <summary>
        ///  查询角色列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeRolesResponse> DescribeRoles(DescribeRolesRequest request) {
            return await new DescribeRolesExecutor().Client(this).Execute<DescribeRolesResponse, DescribeRolesResult, DescribeRolesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除用户组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteGroupResponse DeleteGroup(DeleteGroupRequest request) {
            return  new DeleteGroupExecutor().Client(this).Execute<DeleteGroupResponse, DeleteGroupResult, DeleteGroupRequest>(request);
        }
#else
        /// <summary>
        ///  删除用户组
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteGroupResponse> DeleteGroup(DeleteGroupRequest request) {
            return await new DeleteGroupExecutor().Client(this).Execute<DeleteGroupResponse, DeleteGroupResult, DeleteGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询策略详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribePermissionDetailResponse DescribePermissionDetail(DescribePermissionDetailRequest request) {
            return  new DescribePermissionDetailExecutor().Client(this).Execute<DescribePermissionDetailResponse, DescribePermissionDetailResult, DescribePermissionDetailRequest>(request);
        }
#else
        /// <summary>
        ///  查询策略详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribePermissionDetailResponse> DescribePermissionDetail(DescribePermissionDetailRequest request) {
            return await new DescribePermissionDetailExecutor().Client(this).Execute<DescribePermissionDetailResponse, DescribePermissionDetailResult, DescribePermissionDetailRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  为子用户绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddPermissionsToSubUserResponse AddPermissionsToSubUser(AddPermissionsToSubUserRequest request) {
            return  new AddPermissionsToSubUserExecutor().Client(this).Execute<AddPermissionsToSubUserResponse, AddPermissionsToSubUserResult, AddPermissionsToSubUserRequest>(request);
        }
#else
        /// <summary>
        ///  为子用户绑定策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddPermissionsToSubUserResponse> AddPermissionsToSubUser(AddPermissionsToSubUserRequest request) {
            return await new AddPermissionsToSubUserExecutor().Client(this).Execute<AddPermissionsToSubUserResponse, AddPermissionsToSubUserResult, AddPermissionsToSubUserRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询策略详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribePolicyResponse DescribePolicy(DescribePolicyRequest request) {
            return  new DescribePolicyExecutor().Client(this).Execute<DescribePolicyResponse, DescribePolicyResult, DescribePolicyRequest>(request);
        }
#else
        /// <summary>
        ///  查询策略详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribePolicyResponse> DescribePolicy(DescribePolicyRequest request) {
            return await new DescribePolicyExecutor().Client(this).Execute<DescribePolicyResponse, DescribePolicyResult, DescribePolicyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建主账号AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateUserAccessKeyResponse CreateUserAccessKey(CreateUserAccessKeyRequest request) {
            return  new CreateUserAccessKeyExecutor().Client(this).Execute<CreateUserAccessKeyResponse, CreateUserAccessKeyResult, CreateUserAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  创建主账号AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateUserAccessKeyResponse> CreateUserAccessKey(CreateUserAccessKeyRequest request) {
            return await new CreateUserAccessKeyExecutor().Client(this).Execute<CreateUserAccessKeyResponse, CreateUserAccessKeyResult, CreateUserAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  将子用户从组中删除
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public RemoveSubUserFromGroupResponse RemoveSubUserFromGroup(RemoveSubUserFromGroupRequest request) {
            return  new RemoveSubUserFromGroupExecutor().Client(this).Execute<RemoveSubUserFromGroupResponse, RemoveSubUserFromGroupResult, RemoveSubUserFromGroupRequest>(request);
        }
#else
        /// <summary>
        ///  将子用户从组中删除
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<RemoveSubUserFromGroupResponse> RemoveSubUserFromGroup(RemoveSubUserFromGroupRequest request) {
            return await new RemoveSubUserFromGroupExecutor().Client(this).Execute<RemoveSubUserFromGroupResponse, RemoveSubUserFromGroupResult, RemoveSubUserFromGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  启用子用户AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public EnableSubUserAccessKeyResponse EnableSubUserAccessKey(EnableSubUserAccessKeyRequest request) {
            return  new EnableSubUserAccessKeyExecutor().Client(this).Execute<EnableSubUserAccessKeyResponse, EnableSubUserAccessKeyResult, EnableSubUserAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  启用子用户AccessKey
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<EnableSubUserAccessKeyResponse> EnableSubUserAccessKey(EnableSubUserAccessKeyRequest request) {
            return await new EnableSubUserAccessKeyExecutor().Client(this).Execute<EnableSubUserAccessKeyResponse, EnableSubUserAccessKeyResult, EnableSubUserAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除角色
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteRoleResponse DeleteRole(DeleteRoleRequest request) {
            return  new DeleteRoleExecutor().Client(this).Execute<DeleteRoleResponse, DeleteRoleResult, DeleteRoleRequest>(request);
        }
#else
        /// <summary>
        ///  删除角色
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteRoleResponse> DeleteRole(DeleteRoleRequest request) {
            return await new DeleteRoleExecutor().Client(this).Execute<DeleteRoleResponse, DeleteRoleResult, DeleteRoleRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认IamClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>iamClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>iamClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>iamClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造IamClient 对象
                ///</summary>
                IamClient Build();
            }

            /// <summary>
            ///  默认IamClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  IamClient service client
                /// </summary>
                private  IamClient iamClient;

                /// <summary>
                ///  默认IamClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    iamClient = new IamClient();
                }

                /// <summary>
                ///  构造IamClient 对象
                ///</summary>
                public IamClient Build()
                {
                    if (iamClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        iamClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (iamClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("IamClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (iamClient.HttpRequestConfig == null)
                    {
                        iamClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (iamClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("IamClient build error: http request config not set");
                        }
                    }
                    return iamClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>iamClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    iamClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>iamClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    iamClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>iamClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    iamClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
